package org.xdq.单例模式.优化后的懒汉式;

public class Instance {

    private static class Inner{
        private static Instance instance = new Instance();
    }

    private Instance(){
        System.out.println("优化后的懒汉式单例对象");
    }

    public static  Instance getInstance(){
        return Inner.instance;
    }

}
